package WebServices
{
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	
	internal class HttpResponder
	{
		protected var m_fnSuccess:Function;
		protected var m_fnFailure:Function;
		protected var m_authData:AuthenticationData = null;
		
		public function HttpResponder(auth:AuthenticationData, success:Function, failure:Function)
		{
			m_fnSuccess = success;
			m_fnFailure = failure;
			m_authData = auth; 
		}

		protected function onSuccess(xmlResponse:XML):void
		{
			m_fnSuccess();
			m_fnSuccess = null;
			m_fnFailure = null;
		}
		protected function onSuccessforLists(xmlResponse:XML):void
		{
			m_fnSuccess(xmlResponse);
			m_fnSuccess = null;
			m_fnFailure = null;
		}
		protected function onFailure(err:Error):void
		{
			m_fnFailure(err);
			m_fnSuccess = null;
			m_fnFailure = null;
		}
		
	}
}